/*******************/
/** OPTION VALUES **/
/*******************/


// PRINT LOG //
#define logprint            1    // = 1 if print results. == 2, print the simul_10 file.
#define computethreshold    0


// OMP:: allow to parallelize the code.
#define OMP                 1   // (0 == no omp, 1 == omp on VFI, 2 == omp on params)
#define nbthread            7
int n_iter                  = 15;                // for howard improvement.
double crit_howard_off      = 0.000015;

// option general equilibrium.
#define OPT_GE              1           // = 1, general equilibrium.
    // TO DECOMPOSE EFFECT
    #define Teq                 1   // = 1, tax response is allowed (BECAREFUL, NEED TO START AT RIGHT PRICES)
    #define Weq                 1   // = 1, wage response is allowed
    #define Req                 1   // = 1, int.rate response is allowed

// option model.
#define OPT_labor_demand    1           // = 1, labor demand is endogenous.
#define OPT_policy_exp      0           // 0 == benchmark, 1 == SEA f = 3,  2 = SEA lump-sum, 3 == SEA f = 1 (0 in the code), 4 == SEA, but f == 0 (1 in the code) -- for decomposition, 5 == SEA without compensation
#define OPT_vary_UI_benefit 0           // 1 == activate the option.
#define OPT_vary_UI_dur     0           // 1 == activate the option.
#define OPT_vary_UI_both    0           // 1 == activate the option to generate table in paper.
#define OPT_compute_C_flow  0           // 1 == activate the option to compute flows of all consumption path (for CEV) -- just needed for benchmark!
double alt_def_necessity_SEA = 0.0;     // not useful, just a check for referee.

// Robustness checks.
#define OPT_high_u_rate     0           // 1 == robustness with higher unemployment rate. -- need to save manually the files.
#define OPT_exo_borr_cons   0           // 1 == robustness with exogenous borrowing limit. -- need to save manually the files.
#define OPT_pecuniary_ben   0           // 1 == robustness with pecuniary benefit of self-employment -- need to save manually the files.

// HOW IT IS FINANCED ? //
#define earningSEAtax       1   // 1 means "labor income tax", 0 means "lump-sum".
#define debtadj             0
double taxdebtfixed         = 0.011306767524860;

// write statistics for new entrepreneurs:
#define writeSIMUL10        0
#define SIMUL10             0   // this one is activated only if OPT_policy_exp > 0, must have run writeSIMUL10 == 1 with OPT_policy_exp == 0 before
#define SIMUL10_baseline    0


// INDEXPM:: compute the projected_method. WARNING: indexPMwrite AND OPT_compute_C_flow should be done before, for both past an new SS //
#define indexPM             0
const double nbTperiodPM    = 100;


// UI system
double rhostar    = 0.4;                 //  Unemployment insurance rate (SHIMER (2001))
double pLTpar     = 0.5;                 //  Probability to switch to Long-run Unemployment (0.28 = 46 weeks, 0.5 = 26 weeks)



/** Here the goal is to test the impact of a lump-sum DRI -- totally independent of UI duration.
    -- we let the UI to be equal to the lowest UI level*0.9,
    -- the duration adjust to generate the same share of entrepreneurs as in the benchmark DRI
    -- we let f = 1 as in the benchmark (no profit dependent)
    -- no possibility to come back unemployed with UI
    -- the duration is independent on the UI **/
const double parascale_DRI = 0.9;

#if OPT_policy_exp == 0
    const double DRIpar         = 0.7;
    double mupar          = 0.5;
    #define SEA                 0
    #define NOPOLICY            1
    #define indexPMwrite        1
#endif

#if OPT_policy_exp == 1
    const double DRIpar         = 0.7;
    double mupar          = 0.5;
    #define SEA                 1
    #define NOPOLICY            0
    #define indexPMwrite        2
#endif

#if OPT_policy_exp == 2
    const double DRIpar         = 0.001;
    double mupar                = 0.455;
    #define SEA                 1
    #define NOPOLICY            0
    #define indexPMwrite        2
#endif

#if OPT_policy_exp == 3
    const double DRIpar         = 0.001;
    double mupar          = 0.5;
    #define SEA                 1
    #define NOPOLICY            0
    #define indexPMwrite        2
#endif

#if OPT_policy_exp == 4
    const double DRIpar         = 0.99;
    double mupar          = 0.5;
    #define SEA                 1
    #define NOPOLICY            0
    #define indexPMwrite        2
#endif

#if OPT_policy_exp == 5
    const double DRIpar         = 0.7;
    double mupar          = 0.5;
    #define SEA                 1
    #define NOPOLICY            0
    #define indexPMwrite        2
#endif


// search opti k
#define goldenseul          0



// TO SIMUL OVER T YEARS
#define maxtimesimul        20
#define ifulldimETsimul (maxgrid*maxtheta*maxfirmtype*maxtimesimul)
#define inxETsimul(igridindex,thetagridindex,firmtype,timeindex) (((timeindex)*(maxtheta)*(maxgrid)*(maxfirmtype))+(thetagridindex)*(maxgrid)*(maxfirmtype)+(igridindex)*(maxfirmtype)+firmtype)




/***************/
/**  INCLUDE  **/
/***************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctime>
#include <time.h>
#include <limits>
#include <assert.h>
#include <cstring>
#include <stdio.h>
#include <fstream>
#include <iostream>
#include <random>
#include "nr/nr.h"
#include "nr/ran1.cpp"
//#include "/Users/alexandregaillard/Documents/Compiler/lib/libperso/rouwenhorst.cpp"
#if OMP == 1 || OMP == 2
#include <omp.h>
#endif
#if CRS == 1
#if SOBOLCREATE == 1
#include "/Users/alexandregaillard/Documents/Compiler/lib/libperso/sobol.cpp" // very time compiling
#endif
#endif


// CRS:: allow to search over best parameters.
#define CRS                 0 // (1 = enable, 0 =  disable)
#define SOBOLCREATE         0 // (1 = create a sobol, 0 =  create no sobol)
#define nbsobol             50
#define nbpara              11
#define nbmoments           11
#define randomnum           1






/*******************************/
/** GRID DEFINITION AND INDEX **/
/*******************************/
#define maxAX       500         // Grid search for optimal "k"
#define maxgrid     150          // a (asset grid)
#define maxtheta    3           // theta (innate ability)
#define maxyprod    3           // y (transitory working ability)
#define maxfirmtype 7           // z (business shock)
#define maxgridCOH  150          // To compute optimal C-S-S problem of Repayment / Bankruptcy
#define maxsearch   10000       // To compute ex-ante optimal search effort

// TO COMPUTE SURVIVAL RATE //
#define maxtime 10
#define ifulldimET (maxgrid*maxtheta*maxfirmtype*maxtime)
#define inxET(igridindex,thetagridindex,firmtype,timeindex) ((timeindex)*(maxtheta)*(maxgrid)*(maxfirmtype)+(thetagridindex)*(maxgrid)*(maxfirmtype)+(igridindex)*(maxfirmtype)+firmtype)


// DIMENSION FOR HH'S PROBLEM //
#define ifulldim        (maxgrid*maxtheta)
#define ifulldimE       (ifulldim*maxfirmtype)
#define ifulldimEE      (ifulldim*maxfirmtype*maxfirmtype)
#define ifulldimW       (ifulldim*maxyprod)
#define ifulldimEARN    (maxtheta*maxyprod)
#define ifulldimRB      (maxgridCOH*maxfirmtype*maxtheta)
#define ifulldimS       (maxsearch*maxtheta)                              // To compute the ex-ante optimal search effort


// ACCESS INDEX //
#define inx(igridindex,thetagridindex)           (((igridindex)*(maxtheta))+(thetagridindex))
#define inxE(igridindex,thetagridindex,firmtype) (((igridindex)*(maxtheta)*(maxfirmtype))+(thetagridindex)*(maxfirmtype)+(firmtype))
#define inxEE(igridindex,thetagridindex,zetatype,zetaprimetype) (((thetagridindex)*(maxgrid)*(maxfirmtype)*(maxfirmtype))+(igridindex)*(maxfirmtype)*(maxfirmtype)+(zetatype)*(maxfirmtype)+(zetaprimetype))
#define inxW(igridindex,thetagridindex,ygridindex) (((igridindex)*(maxtheta)*(maxyprod))+(thetagridindex)*(maxyprod)+(ygridindex))
#define inxEARN(tgridindex, ygridindex)          ((tgridindex)*(maxyprod)+(ygridindex))
#define inxRB(igridCOH,tgrid,zgrid)              ((maxgridCOH)*(maxtheta)*(zgrid)+(tgrid)*(maxgridCOH)+(igridCOH))
#define inxS(sgridindex,tgridindex)              ((tgridindex)*(maxsearch)+(sgridindex))


// FOR PM //
#define inxTP(indext, igridindex, tgridindex) ((maxgrid)*(maxtheta)*(indext)+(tgridindex)*(maxgrid)+igridindex)
#define inxTPE(indext, igridindex, tgridindex, typeindex) ((indext)*(maxgrid)*(maxfirmtype)*(maxtheta)+(tgridindex)*(maxgrid)*(maxfirmtype)+(igridindex)*(maxfirmtype)+typeindex)
#define inxTPW(indext, igridindex, tgridindex, ygridindex) ((indext)*(maxgrid)*(maxyprod)*(maxtheta)+(tgridindex)*(maxgrid)*(maxyprod)+(igridindex)*(maxyprod)+ygridindex)


// WEALTH GRID //
#define Gridmin 0.0
#define Gridmax 2000.0
const double Echelle1 = 1.0;
double grid[maxgrid], earningdist[ifulldimW][4], hhincE[ifulldimEE][3];

// COH GRID //
#define GridminCOH 0.00001
double GridmaxCOH = 2000.0;
const double EchelleCOH = 1.0;
double gridCOH[maxgridCOH];

// DIFFVALUES for SEARCHING EFFORTS //
#define gridmaxsearch 50.0
#define gridminsearch 0.0
const double EchelleW = 1.0;
double diffvalues[maxsearch], search1D_E[maxsearch], search1D_W[ifulldimS], search2D_E[maxsearch];


// SEARCHING EFFORT //
#define EffortMaxW 100.0
#define EffortMaxE 100.0


// IF search effort are fixed FOR UNEMPLOYED //
#if holdfixedSE == 1
    double fixedSEUiE[ifulldim], fixedSEUiNE[ifulldim];
#endif
#if holdfixedSW == 1
    double fixedSiE[ifulldim], fixedSiNE[ifulldim];
#endif




/***************************/
/*****  STARTING DIST ******/
/***************************/
double s_distUnE    = 0.0;
double s_distUiE    = 0.0;
double s_distWWE    = 0.0;
double s_distWWNE   = 1.0;
double s_distUiNE   = 0.0;
double s_distUnNE   = 0.0;
double s_distJE     = 0.0;
double s_distJNE    = 0.0;
#if SEA == 1
double s_distJEi    = 0.0;
double s_distJNEi   = 0.0;
#endif




/****************************/
/** CALIBRATION DEFINITION **/
/****************************/

// STARTING VALUES //

#if SEA == 1
double taxstartSEA      = 0.0; // if financed through proportional tax
double lumpsumSEAstart  = 0.0;    // if financed with lumpsum tax
#endif
#if NOPOLICY == 1 
double taxstartSEA      = 0.0;
double lumpsumSEAstart  = 0.0;
#endif
double meanwagestart = 0.328134130285926;

// EQUILIBRIUM VARIABLES //
double rstar;
double wstar;
double lstar;
double ustar; // possibly useless.
double taxrate;
double lumpsumSEA;



// business shock
double muz              = 1.0;                 //  normalized
double gmapping[maxtheta];
double statez[maxfirmtype], mzprob[maxfirmtype][maxfirmtype], mzinv[maxfirmtype];

// match-quality y:
double py       = 0.80,     sigy     = 0.18;       // prsistence + std of transitory shock y.
double yprod[maxyprod], myprod[maxyprod][maxyprod], invmyprod[maxyprod];

// ability theta:
double prod[maxtheta] = {0.393221996043480, 1.0, 2.54309273148958};   //  productivity worker.
double mprod[maxtheta][maxtheta] = {
    {0.97515625,    0.0246875,     0.00015625},
    {0.01234375,    0.9753125,     0.01234375},
    {0.00015625,    0.0246875,     0.97515625}
};


// ESTIMATED PARAMETER, STARTING VALUES //
#if OPT_labor_demand == 1
    #if OPT_policy_exp == 0
        double rstart   = 0.016510391666088;
        double lstart   = 1.094347964821837;
        double taxstart = 0.009027144467390;
        double wstart   = 0.253706723228092;
        double capstart = 3.850972708693789;
    #endif

    #if OPT_policy_exp == 1
        double rstart   = 0.016489214609214;
        double lstart   = 1.092283685317583;
        double taxstart = 0.009314127952320;
        double wstart   = 0.253781277852715;
        double capstart = 3.847103650944631;
    #endif

    #if OPT_policy_exp == 2
        double rstart   = 0.016496051740501;
        double lstart   = 1.092548665805339;
        double taxstart = 0.009294948603129;
        double wstart   = 0.253757200218391;
        double capstart = 3.846927075875616;
    #endif

    #if OPT_policy_exp == 3
        double rstart   = 0.016487125182303;
        double lstart   = 1.091895496554092;
        double taxstart = 0.009425010811369;
        double wstart   = 0.253788637357542;
        double capstart = 3.846112952469702;
    #endif

    #if OPT_policy_exp == 4
        double rstart   = 0.016489989167641;
        double lstart   = 1.092392045549377;
        double taxstart = 0.009290515499587;
        double wstart   = 0.253778549820850;
        double capstart = 3.847373755083973;
    #endif

    #if OPT_policy_exp == 5
        double rstart   = 0.016505091232235;
        double lstart   = 1.093496576315525;
        double taxstart = 0.009122848221395;
        double wstart   = 0.253725377377461;
        double capstart = 3.848821033318127;
    #endif

    double betapar      = 0.97390;              //  discount factor
    // MATCHING //
    double kappaE       = 0.28000;              //  KappaE; matching parameter for entrepreneur
    double psiparW      = 1.8500;              //  Effort elasticity parameter for job search
    double psiparE      = psiparW;              //  Effort elasticity parameter for Entrepreneurship search
    #if OPT_high_u_rate == 0
        double kappaW       = 0.80546;              //  KappaW; matching parameter for job finding
        const double etapar[maxtheta] = {0.0350, 0.0195, 0.0135}; //  Layoff rate
    #endif
    #if OPT_high_u_rate == 1
        double kappaW       = 0.60546;              //  KappaW; matching parameter for job finding
        const double etapar[maxtheta] = {0.0350*2, 0.0195*2, 0.0135*2}; //  Layoff rate
    #endif
    // ENTREPRENEUR'S PARAMETERS //
    double nupar        = 0.89000;               //  Return to scale in entrepreneurial sector
    double court_cost   = 0.06300;
    double labor_supply_ent_constant  = 0.2200;
    double labor_supply_ent[maxtheta] = {labor_supply_ent_constant,labor_supply_ent_constant,labor_supply_ent_constant};
    //double labor_supply_ent = 0.22;
    // BUSINESS SHOCK PROCESS //
    double pz           = 0.90000;              //  match the exit rate
    double sigz         = 0.41850;              //  match the negative income rate
//    // ENTREPRENEURIAL ABILITIES MAPPING //
//    double meang        = 0.09800;              //  scale for gmapping
//    double g1           = 2.13900*meang;
//    double g2           = 2.4330*meang;
//    double g3           = 2.8450*meang;
    // ENTREPRENEURIAL ABILITIES MAPPING //
    double meang        = 0.098425;              //  scale for gmapping
    double g1           = 2.17900*meang;
    double g2           = 2.44300*meang;
    double g3           = 2.84000*meang;
#endif

#if OPT_labor_demand == 0
    double rstart   = 0.016427740647238;
    double lstart   = 1.098677198710157;
    double taxstart = 0.009024547350515;
    double wstart   = 0.247455902396062;
    double capstart = 3.584716941312852;

    double betapar      = 0.97415;         //  discount factor
    // MATCHING //
    double kappaE       = 0.26818;             //  KappaE; matching parameter for entrepreneur
    double kappaW       = 0.8546;             //  KappaW; matching parameter for job finding
    double psiparW      = 2.414;                       //  Effort elasticity parameter for job search
    double psiparE      = psiparW;                       //  Effort elasticity parameter for Entrepreneurship search
    // ENTREPRENEUR'S PARAMETERS //
    double nupar        = 0.7897;             //  Return to scale in entrepreneurial sector
    double court_cost   = 0.03379;
    // BUSINESS SHOCK PROCESS //
    double pz           = 0.8688;
    double sigz         = 0.43048;              //  match the bankruptcy rate.
    // ENTREPRENEURIAL ABILITIES MAPPING //
    double meang        = 0.06744;             //  scale for gmapping
    double g1           = 1.0557*meang;
    double g2           = 1.127*meang;
    double g3           = 1.5222*meang;
    const double etapar[maxtheta] = {0.0315, 0.0215, 0.0115}; //  Layoff rate
#endif



//////////////////////
// FIXED PARAMETERS //
//////////////////////


#if OPT_exo_borr_cons == 0
    const double lambdapar  = 50;                  //  Borrowing constraint parameter
    double frac_repay       = 0.77;                //  fraction that the entrepreneur has to repay.
#endif
#if OPT_exo_borr_cons == 1
    const double lambdapar  = 0.5;                  //  Borrowing constraint parameter
    double frac_repay       = 1.0;                //  fraction that the entrepreneur has to repay.
#endif
const double minpar     = 0.04;                //  minimum subsistence level
const double wedgerate  = 0.004;               // interest rate wedge
const double phipar     = 0.0417;              //  Probability to be forgetten from financial market
const double deltapar   = 0.015;               //  depreciation rate
const double alphapar   = 0.33;                //  return to scale parameter
const double GratioY    = 0.0;                 //  Government expenditure / output
const double corptax    = 0.0;                 //  Government expenditure / output
const double TFPpar     = 0.25;                //  TFP Parameter for quarterly data.
const double newyoung   = 0.006;               //  new young entering the labor market each quarter.
double costparUi        = -0.07;
const double sigmapar   = 1.5;                 //  Intertemp. Elasticity of subsitution (CRRA)
double gammapar         = 0.33;                // such that nu*gamma = 0.33;  0.25000;
#if OPT_pecuniary_ben == 0
    const double self_non_pecuniary = 0.0;         //  non pecuniary benefit of being self-employed.
#endif
#if OPT_pecuniary_ben == 1
    const double self_non_pecuniary = 0.07;         //  non pecuniary benefit of being self-employed -- need to change meang accordingly.
#endif

// Utility function
#define utilc(x,occ) (pow((x),(1.0-sigmapar*1.0))/(1.0-sigmapar*1.0) + (occ)*self_non_pecuniary)

//disutility of effort
#define disutilityW(x) (-pow((x),psiparW))
#define disutilityE(x) (-pow((x),psiparE))

//marginal disutility of effort
#define dsearchdesutilityW(x) (psiparW*(pow((x),(psiparW-1.0))))
#define dsearchdesutilityE(x) (psiparE*(pow((x),(psiparE-1.0))))




/*************************/
//  NUMERICAL PARAMETERS //
/*************************/

//value function cnvg criterion
#define epsilonValue    0.00001
const int maxiterVF     = 600;
#define epsilonendoK    0.000001
const int maxiterendoK  = 300;
#define epsilonDist     0.000000001
const int maxiterDist   = 10000;
double critprice;
#define epsilonprice    0.0001
#define itermax         100
#define epsilonparams   0.001
#define relaxK          0.2
#define relaxL          0.2
#define relaxTax        0.9
#define relaxRate       0.0
#define relaxTP         0.2
#define epsilonTP       0.0001


// TOLERANCE MNBRACK
const double GOLD=1.618034,GLIMIT=100.0,TINY=1.0e-20;

// TOLERANCE MNGOLDEN
const double TOL        = 1.0e-6;
const double TOLZbrent  = 1.0e-6;
const double TOLJEi     = 1.0e-6;
const double R  =   0.61803399, C   =  1.0-R;


//seed de ran1
int idum;
int cseed;



/***************************/
//  CONTROL RANDOM SEARCH  //
/***************************/

// FILE OUT //
char SMM_fileout[80]; //="INPUT/PARA.out";
char SOBOL[80]; //="INPUT/SOBOL.out";
double obsmoments[nbmoments];
double covmat[nbmoments][nbmoments]; // identity matrix.




/*****************/
//  OUTPUT FILES //
/*****************/

// TEMP FILE //
char tempfileout[80];//="results\tempfile_20141202@1632.out";

// VALUE FUNCTIONS AND POLICIES //
const char JNEval[] ="OUTPUT/VF/JNEvalues.out";
const char JEval[]  ="OUTPUT/VF/JEvalues.out";
const char JNEpol[] ="OUTPUT/VF/JNEpolicies.out";
const char JEpol[]  ="OUTPUT/VF/JEpolicies.out";
const char JNEival[]="OUTPUT/VF/JNEivalues.out";
const char JEival[] ="OUTPUT/VF/JEivalues.out";
const char JNEipol[]="OUTPUT/VF/JNEipolicies.out";
const char JEipol[] ="OUTPUT/VF/JEipolicies.out";
const char Rfile[]  ="OUTPUT/VF/Rfile.out";
const char Bfile[]  ="OUTPUT/VF/Bfile.out";
const char Ehatfile[]="OUTPUT/VF/Ehat.out";
const char WWE[]    ="OUTPUT/VF/WWE.out";
const char WWNE[]   ="OUTPUT/VF/WWNE.out";
const char UiE[]    ="OUTPUT/VF/UiE.out";
const char UiNE[]   ="OUTPUT/VF/UiNE.out";
const char UnE[]    ="OUTPUT/VF/UnE.out";
const char UnNE[]   ="OUTPUT/VF/UnNE.out";
const char SSendo[] ="OUTPUT/VF/Sendo.out";

const char searchSEUiEbench[]   = "OUTPUT/bench/fileSEUiE.out";
const char searchSiEbench[]   = "OUTPUT/bench/fileSiE.out";
const char searchSEUiNEbench[]  = "OUTPUT/bench/fileSEUiNE.out";
const char searchSiNEbench[]  = "OUTPUT/bench/fileSiNE.out";
const char searchSEUiEreform[]  = "OUTPUT/reform/fileSEUiE.out";
const char searchSiEreform[]  = "OUTPUT/reform/fileSiE.out";
const char searchSEUiNEreform[] = "OUTPUT/reform/fileSEUiNE.out";
const char searchSiNEreform[] = "OUTPUT/reform/fileSiNE.out";

// DISTRIBUTIONS //
const char distfileW[]      =   "OUTPUT/distribution/distWW.out";
const char distfileU[]      =   "OUTPUT/distribution/distU.out";
char distfileJ[150];
char distfileJi[150];


char distfilewealth[150];
const char distfilesize[]   =   "OUTPUT/distribution/distfirm.out";
const char flowWWtoJ[]      =   "OUTPUT/distribution/flowWWtoJ.out";
const char flowJtoWW[]      =   "OUTPUT/distribution/flowJtoWW.out";
const char flowUiEtoJ[]     =   "OUTPUT/distribution/flowUiEtoJ";
char distnecessity[150];
char distnecessityW[150];


const char thresholdfile[]  =   "OUTPUT/threshold.out";
const char axDRIfileout[]   =   "OUTPUT/axDRI.out";
const char newSimpliedout[] =   "SEAstat/newSimplied.out";

// MOMENTS //
const char moment[]="OUTPUT/moment.out";

// CONTRIBUTION 10 - 20 YEARS //
const char simul10[]      ="OUTPUT/simul10.out";
const char simul10_2[]    ="OUTPUT/simul10_2.out";
const char UiEtoJE_bench[]="OUTPUT/bench/distUiEtoJE.out";
const char UitoJNE_bench[]="OUTPUT/bench/distUitoJNE.out";

// PROJECTED METHOD // --> compute transition path
char pricepathfile[150];
char CEV_J[150];
char CEV_W_file[150];
char CEV_U_file[150];
char VEILTfile[150];
char CEV_TOT[150];
char CEV[150];




/***** INITIAL STEADY STATE *****/
const char distJE_0file[]  ="OUTPUT/project_method/distJE_0.out";
const char distJNE_0file[] ="OUTPUT/project_method/distJNE_0.out";
const char distWWNE_0file[]="OUTPUT/project_method/distWWNE_0.out";
const char distWWE_0file[] ="OUTPUT/project_method/distWWE_0.out";
const char distUiE_0file[] ="OUTPUT/project_method/distUiE_0.out";
const char distUiNE_0file[]="OUTPUT/project_method/distUiNE_0.out";
const char distUnE_0file[] ="OUTPUT/project_method/distUnE_0.out";
const char distUnNE_0file[]="OUTPUT/project_method/distUnNE_0.out";

const char valueJE_0file[]  ="OUTPUT/project_method/valueJE_0.out";
const char valueJNE_0file[] ="OUTPUT/project_method/valueJNE_0.out";
const char valueWWNE_0file[]="OUTPUT/project_method/valueWWNE_0.out";
const char valueWWE_0file[] ="OUTPUT/project_method/valueWWE_0.out";
const char valueUiE_0file[] ="OUTPUT/project_method/valueUiE_0.out";
const char valueUiNE_0file[]="OUTPUT/project_method/valueUiNE_0.out";
const char valueUnE_0file[] ="OUTPUT/project_method/valueUnE_0.out";
const char valueUnNE_0file[]="OUTPUT/project_method/valueUnNE_0.out";

const char C_JE_0file[]  ="OUTPUT/project_method/C_JE_0.out";
const char C_JNE_0file[] ="OUTPUT/project_method/C_JNE_0.out";
const char C_WWNE_0file[]="OUTPUT/project_method/C_WWNE_0.out";
const char C_WWE_0file[] ="OUTPUT/project_method/C_WWE_0.out";
const char C_UiE_0file[] ="OUTPUT/project_method/C_UiE_0.out";
const char C_UiNE_0file[]="OUTPUT/project_method/C_UiNE_0.out";
const char C_UnE_0file[] ="OUTPUT/project_method/C_UnE_0.out";
const char C_UnNE_0file[]="OUTPUT/project_method/C_UnNE_0.out";

/***** NEW STEADY STATE *****/
const char distJE_Tfile[]    ="OUTPUT/project_method/distJE_T.out";
const char distJNE_Tfile[]   ="OUTPUT/project_method/distJNE_T.out";
const char distJEi_Tfile[]   ="OUTPUT/project_method/distJEi_T.out";
const char distJNEi_Tfile[]  ="OUTPUT/project_method/distJNEi_T.out";
const char distWWNE_Tfile[]  ="OUTPUT/project_method/distWWNE_T.out";
const char distWWE_Tfile[]   ="OUTPUT/project_method/distWWE_T.out";
const char distUiE_Tfile[]   ="OUTPUT/project_method/distUiE_T.out";
const char distUiNE_Tfile[]  ="OUTPUT/project_method/distUiNE_T.out";
const char distUnE_Tfile[]   ="OUTPUT/project_method/distUnE_T.out";
const char distUnNE_Tfile[]  ="OUTPUT/project_method/distUnNE_T.out";

const char valueJNE_Tfile[]  ="OUTPUT/project_method/valueJNE_T.out";
const char valueJE_Tfile[]   ="OUTPUT/project_method/valueJE_T.out";

const char valueJNEi_Tfile[]="OUTPUT/project_method/valueJNEi_T.out";
const char valueJEi_Tfile[] ="OUTPUT/project_method/valueJEi_T.out";

const char valueWWNE_Tfile[]="OUTPUT/project_method/valueWWNE_T.out";
const char valueWWE_Tfile[] ="OUTPUT/project_method/valueWWE_T.out";
const char valueUiE_Tfile[] ="OUTPUT/project_method/valueUiE_T.out";
const char valueUiNE_Tfile[]="OUTPUT/project_method/valueUiNE_T.out";
const char valueUnE_Tfile[] ="OUTPUT/project_method/valueUnE_T.out";
const char valueUnNE_Tfile[]="OUTPUT/project_method/valueUnNE_T.out";

const char saveJE_Tfile[]   ="OUTPUT/project_method/saveJE_Tfile.out";
const char saveJNE_Tfile[]  ="OUTPUT/project_method/saveJNE_Tfile.out";
const char saveJNEi_Tfile[] ="OUTPUT/project_method/saveJNEi_Tfile.out";
const char saveJEi_Tfile[]  ="OUTPUT/project_method/saveJEi_Tfile.out";

const char saveWWNE_Tfile[]="OUTPUT/project_method/saveWWNE_Tfile.out";
const char saveWWE_Tfile[] ="OUTPUT/project_method/saveWWE_Tfile.out";
const char saveUiNE_Tfile[]="OUTPUT/project_method/saveUiNE_Tfile.out";
const char saveUnNE_Tfile[]="OUTPUT/project_method/saveUnNE_Tfile.out";
const char saveUiE_Tfile[] ="OUTPUT/project_method/saveUiE_Tfile.out";
const char saveUnE_Tfile[] ="OUTPUT/project_method/saveUnE_Tfile.out";





